package com.yao.shop.mapper;

import com.yao.shop.common.Page;
import com.yao.shop.pojo.ShopCoupon;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface ShopCouponMapper {
    void save(ShopCoupon shopCoupon);

    void delete(Long id);

    List<ShopCoupon> getByPage(Page<ShopCoupon> page);

    Integer countByPage(Page<ShopCoupon> page);

    void down(Long id);

    List<ShopCoupon> getBothCoupon();

    List<ShopCoupon> getByCategoryId(Long categoryId);

    List<ShopCoupon> getByProductId(Long productId);

    ShopCoupon get(Long couponId);

    void updateTimeoutCoupon();

    void updateCount(ShopCoupon coupon);
}
